<h1>Listing attachments</h1>

<table>
  <tr>
    <th>Id</th>
    <th>Type</th>
  </tr>

<% for attachment in @attachments %>
  <tr>
    <td><%=h attachment.id %></td>
    <td><%=h attachment.type %></td>
    <td><%= link_to 'Show', attachment_url(attachment) %></td>
    <td><%= link_to 'Edit', edit_attachment_path(attachment) %></td>
    <td><%= link_to 'Destroy', attachment_url(attachment), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New attachment', new_attachment_path %>
